<template>
  <el-dialog v-model="dialogVisible" title="新增岗位" width="50%" :before-close="handleClose">
    <el-form ref="jobFormRef" :model="ruleForm" :rules="rules" label-width="120px" size="large" status-icon>
      <el-form-item label="岗位名称">
        <el-input></el-input>
      </el-form-item>
      <el-form-item label="数据获取方式">
        <el-radio-group v-model="ruleForm.resource">
          <el-radio label="自动获取数据" />
          <el-radio label="手动录入" />
          <div></div>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="工作经验">
        <el-form-item>
          <el-input placeholder="请输入"></el-input>
        </el-form-item>

        <el-select v-model="ruleForm.region" placeholder="请选择工作经验">
          <el-option label="0-1年" value="shanghai" />
          <el-option label="1-3年" value="beijing" />
        </el-select>
      </el-form-item>
      <el-form-item label="薪酬范围">
        <el-select v-model="ruleForm.region" placeholder="薪酬">
          <el-option label="k/月" value="shanghai" />
          <el-option label="w/年" value="beijing" />
        </el-select>
      </el-form-item>
      <el-form-item label="是否显示">
        <el-switch> </el-switch>
      </el-form-item>
      <el-form-item label="知识属性">
        <div>
          <div>属性名称</div>
          <div>属性值</div>
        </div>
        <ul>
          <li>
            <div>
              <el-form-item></el-form-item>
            </div>
          </li>
        </ul>
      </el-form-item>
    </el-form>
    <template #footer>
      <span class="dialog-footer">
        <el-button @click="dialogVisible = false">取消</el-button>
        <el-button type="primary" @click="dialogVisible = false"> 保存 </el-button>
      </span>
    </template>
  </el-dialog>
</template>

<script setup lang="ts">
import { reactive, onBeforeMount, onMounted, inject } from "vue";
import { ElMessageBox } from "element-plus";
let dialogVisible = inject("isShowAddDialog");
const handleClose = () => {
  // ElMessageBox.confirm("内容未保存，是否确认退出？", "提示").then(() => {
  dialogVisible.value = !dialogVisible.value;
  // });
};
</script>
<style lang="scss" scoped></style>
